//
//  TGCover.m
//  团购
//
//  Created by wwj on 15/11/11.
//  Copyright © 2015年 itcast. All rights reserved.
//

#import "TGCover.h"

@implementation TGCover

+(instancetype)cover{
    return [[self alloc] init];
}

+(instancetype)coverWithTarget:(id)target action:(SEL)action{
    TGCover *cover = [TGCover cover];
    [cover addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:target action:action]];
    return cover;
}

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
        self.backgroundColor = [UIColor blackColor];
        self.alpha = 0.6;
        
    }
    return self;
}

-(void)restCover{
    self.alpha = 0.6;
}

@end
